Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / docs / boards / Board - STM32Discovery.md
blob036b268abae5d359cbb502152910edef713979c3
1 # Boards - STM32Discovery
3 STM32Discovery boards are relatively cheap boards featuring STM32 MCUs manufactured and distributed by [STMicroelectronics](https://www.st.com/). They are known as "tinkerer boards", not specifically as flight controllers, as they can be used for a variety of things. They are bigger and heavier than standard flight controllers, feature plug pins for ease of use and quick changes, no soldering required.
5 They come with different MCUs and in different sizes, however pin-outs are very similar for compatibility with external boards which can be used as extensions.
7 Solid documentation is provided by STMicroelectronics.
10 ## Targets
12 | Target               | MCU           | Documentation |
13 | ---                  | ---           | --- |
14 | `STM32F3DISCOVERY`   | `STM32F303VC` | [User Manual](https://www.st.com/content/ccc/resource/technical/document/user_manual/8a/56/97/63/8d/56/41/73/DM00063382.pdf/files/DM00063382.pdf/jcr:content/translations/en.DM00063382.pdf) \| [MCU Datasheet](www.st.com/resource/en/datasheet/stm32f303vc.pdf) |
15 | `STM32F4DISCOVERY`   | `STM32F407VG` | [User Manual](https://www.st.com/content/ccc/resource/technical/document/user_manual/70/fe/4a/3f/e7/e1/4f/7d/DM00039084.pdf/files/DM00039084.pdf/jcr:content/translations/en.DM00039084.pdf) \| [MCU Datasheet](https://www.st.com/resource/en/datasheet/stm32f407vg.pdf) |
16 | `STM32F411DISCOVERY` | `STM32F411VE` | [User Manual](https://www.st.com/content/ccc/resource/technical/document/user_manual/e9/d2/00/5e/15/46/44/0e/DM00148985.pdf/files/DM00148985.pdf/jcr:content/translations/en.DM00148985.pdf) \| [MCU Datasheet](https://www.st.com/resource/en/datasheet/stm32f411re.pdf) |
18 Hardware specifications, peripherals, pinouts and all other data can be found in above User Manuals. Rest of this document is instead going to focus on setup of the board for Betaflight and example assemblies/wirings.
20 _Note: Not all pin-outs seem to be listed in the User Manual, double-checking in MCU Datasheet is recommended._
22 ### Pins
24 | Function       | F3   | F4   | F411 |
25 | ---            | ---  | ---  | ---  |
26 | PPM Receiver   | PB8  | PB9  | PB8  |
27 | Motor 1        | PA8  | PB1  | PD12 |
28 | Motor 2        | PC6  | PB0  | PB1  |
29 | Motor 3        | PC7  | PA2  | PB0  |
30 | Motor 4        | PC8  | PA3  | PA2  |
31 | Motor 5        | /    | PA10 | PA3  |
32 | Motor 6        | /    | PA8  | PA10 |
33 | Beeper         | PD12 | /    | PA8  |
34 | USART1 TX      | PA9  | PB6  | PA15 |
35 | USART1 RX      | PA10 | PB7  | PA10 |
36 | USART2 TX      | PD5  | PA2  | PA2  |
37 | USART2 RX      | PD6  | PA3  | PA3  |
38 | USART3 TX      | PB10 | PB10 | /    |
39 | USART3 RX      | PB11 | PB11 | /    |
40 | USART4 TX      | PC10 | PA0  | /    |
41 | USART4 RX      | PC11 | PA1  | /    |
42 | USART5 TX      | PC12 | /    | /    |
43 | USART5 RX      | PD2  | /    | /    |
44 | USART6 TX      | /    | PC6  | PC6  |
45 | USART6 RX      | /    | PC7  | PC7  |
46 | HCSR04 Trigger | PB0  | /    | /    |
47 | HCSR04 Echo    | PB1  | /    | /    |
49 _Note: `/` means not supported or configured._
52 ## Setup
54 ### Flash
56 - Connect board using `ST-LINK` labelled port (usually Mini-B USB connector)
58 **Linux & Mac:**
59 - Install [stlink](https://github.com/texane/stlink)
60 - `$ st-flash --format ihex write program.hex`
62 **Windows:**
63 - Install and use [STM32 ST-LINK utility](https://www.st.com/en/development-tools/stsw-link004.html)
65 ### Connect Configurator
67 - Connect board using `USER` labelled port (usually Micro-AB or secondary Mini-B USB connector)
70 ## Example Assembly
72 As an example of full assembly, [feriCopterV1](https://github.com/Nailim/feriCopterV1) is completely custom built drone as part of a student project. Includes simple 3D printed frame, parts list, assembly and pin connection instructions, providing a great entry-point to anyone who wants to assemble their own little drone cheaply and learn more about how everything works.
74 It is based on `STM32F3DISCOVERY` target, required changes in Configurator are noted below. Also refer to [Target Pins](#pins) table for other Discovery boards. Additional non-pin changes are noted below.
76 **Configurator:**
78 | Setting  | Value |
79 | ---      | ---   |
80 | Mixer    | Quad X 1234 |
81 | Receiver | PPM RX input |
83 ### F411 Changes
85 - Inversed Front/Back (Front is Back and Back is Front).
86 - Frame requires minor incision to fit different jumper location.